<%@ page contentType="text/html;charset=utf-8" language="java" %>
<script type="text/javascript" language="javascript">
    //init
    $(function() {
        var totalPage = "${pageCount}";
        var totalRecords = "${recordCount}";
        var pageNo = "${pageNum}";
        if (!pageNo) {
            pageNo = 1;
        }
        //生成分页
        //有些参数是可选的，比如lang，若不传有默认值
        kkpager.generPageHtml({
            pno : pageNo,
            //总页码
            total : totalPage,
            //总数据条数
            totalRecords : totalRecords,
            mode:'click',
            click : function(n) {
                $("#pageNum").val(n);
                $("#queryForm").submit();
            }
        }); 
    });
</script>
<input type="hidden" id="pageNum" name="pageNum" value="${pageNum}"/>
<input type="hidden" id="pageSize" name="pageSize" value="${pageSize}"/>
<input type="hidden" id="recordCount" name="recordCount" value="${recordCount}"/>

<div id="kkpager" class="fRight"></div>
<script type="text/javascript" language="javascript">
//解决查询分页问题
$(document).ready(function(){
	$("a").each(function() {
		if ($(this).text() == "查询") {
			$(this).attr('onclick','').unbind('click').click(function(){y();});
		}
	});
    function y(){
    		 $("#pageNum").val("1");
    		 $("#pageSize").val("10");
    		 $("#queryForm").submit();
     }
});
</script>

